package com.example.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author 紫煦桉
 */
public class ComputerUse extends AbstractToString {
    private Integer clistNo;
    private ComputerMessage computerMessage;
    private ReaderMessage readerMessage;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date openDate;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date closeDate;
    private AreaMessage areaMessage;

    public ComputerUse() {
    }

    public ComputerUse(Integer clistNo) {
        this.clistNo = clistNo;
    }

    public ComputerUse(Integer clistNo, Date openDate, Date closeDate) {
        this.clistNo = clistNo;
        this.openDate = openDate;
        this.closeDate = closeDate;
    }

    public ComputerUse(Integer clistNo, ComputerMessage computerMessage, ReaderMessage readerMessage, Date openDate, Date closeDate, AreaMessage areaMessage) {
        this.clistNo = clistNo;
        this.computerMessage = computerMessage;
        this.readerMessage = readerMessage;
        this.openDate = openDate;
        this.closeDate = closeDate;
        this.areaMessage = areaMessage;
    }

    public Integer getClistNo() {
        return clistNo;
    }

    public void setClistNo(Integer clistNo) {
        this.clistNo = clistNo;
    }

    public ComputerMessage getComputerMessage() {
        return computerMessage;
    }

    public void setComputerMessage(ComputerMessage computerMessage) {
        this.computerMessage = computerMessage;
    }

    public ReaderMessage getReaderMessage() {
        return readerMessage;
    }

    public void setReaderMessage(ReaderMessage readerMessage) {
        this.readerMessage = readerMessage;
    }

    public Date getOpenDate() {
        return openDate;
    }

    public void setOpenDate(Date openDate) {
        this.openDate = openDate;
    }

    public Date getCloseDate() {
        return closeDate;
    }

    public void setCloseDate(Date closeDate) {
        this.closeDate = closeDate;
    }

    public AreaMessage getAreaMessage() {
        return areaMessage;
    }

    public void setAreaMessage(AreaMessage areaMessage) {
        this.areaMessage = areaMessage;
    }
}
